package model;

import java.io.Serializable;
import java.util.Date;

public class Order implements Serializable {
	private static final long serialVersionUID = -8378627933215103643L;

	private int userId;
	private String transactionId;
	private Date date;
	private String stockname;
	private int number;
	private int price;

	public Order(int userId, String transactionId, Date date,
			String stockname, int number, int price) {
		this.userId = userId;
		this.transactionId = transactionId;
		this.date = date;
		this.stockname = stockname;
		this.number = number;
		this.price = price;
	}

	public String getTransactionId() {
		return transactionId;
	}

	public Date getDate() {
		return date;
	}

	public String getStockName() {
		return stockname;
	}

	public int getNumber() {
		return number;
	}

	public int getPrice() {
		return price;
	}

	public int getUserId() {
		return userId;
	}
	
	public boolean equals(Order o) {
		return transactionId.equals(o.getTransactionId());
	}

	public void setNumber(int number) {
		this.number = number;
	}

	public void setPrice(int price) {
		this.price = price;
	}
}
